<!--
 * @Author: susu 1628469970@qq.com
 * @Date: 2022-10-13 22:59:59
 * @LastEditors: susu 1628469970@qq.com
 * @LastEditTime: 2022-10-25 00:35:15
 * @FilePath: \css_demos\web\页面动效相关！！！！\138. clip-path实现圆点围绕半圆弧转一圈.htm
 * @Description: 139. clip-path实现圆点围绕半圆弧转一圈
-->
<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>139. clip-path实现圆点围绕半圆弧转一圈</title>
  <!-- clip-path 属性使用裁剪方式创建元素的可显示区域。区域内的部分显示，区域外的隐藏。可以指定一些特定形状。
    https://www.runoob.com/cssref/pr-clip-path.html -->
</head>
<link rel="stylesheet" href="../common.css">
<style>
  :root {
    --bg: #222;
  }

  .container-box {
    width: 200px;
    height: 200px;
    position: relative;

  }

  .container-box:nth-child(1),
  .container-box:nth-child(2) {
    margin-right: 40px;
  }

  .container-box .box-circle {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: url("./img/bg.png") no-repeat;
    background-size: 100% 100%;
    position: absolute;
    left: 0;
    top: 0;
    z-index: 11;
  }


  .box-circle.clip-path {
    -webkit-clip-path: polygon(100% 0, 100% 86%, 50% 50%, 0% 86%, 0 0);
    clip-path: polygon(100% 0, 100% 86%, 50% 50%, 0% 86%, 0 0);
  }

  .container-box .box-circle .box-dot {
    width: 190px;
    height: 190px;
    border: 8px solid transparent;
    border-radius: 50%;
    position: absolute;
    left: calc(50% - 95px);
    top: calc(50% - 95px);
    animation: rotate 3s infinite linear;
  }

  .container-box .box-circle .box-dot::after {
    content: "";
    position: absolute;
    width: 30px;
    height: 30px;
    background: url("./img/dot.png") no-repeat;
    background-size: 100% 100%;
    top: 114px;
    left: -7px;
    z-index: 11;
  }

  @keyframes rotate {
    0% {
      transform: rotate3D(0, 0, 1, 0);
    }

    100% {
      transform: rotate3D(0, 0, 1, 360deg);
    }
  }

  .container-box-ex {
    width: 200px;
    height: 200px;
    position: relative;
  }

  .container-box-ex .box-circle {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    position: absolute;
    left: calc(50% - 100px);
    top: calc(50% - 100px);
    z-index: 11;
    background: none;
  }

  .container-box-ex .box-circle::before {
    content: '';
    width: 188px;
    height: 188px;
    border-radius: 50%;
    position: absolute;
    left: calc(50% - 94px);
    top: calc(50% - 94px);
    /* 这里需要设置两个背景，第一个背景是内容区域的背景，另一个是实现渐变边框的背景 */
    background-image: linear-gradient(var(--bg), var(--bg)),
      linear-gradient(to right, #1DEEF2, #F3C954);
    background-origin: border-box;
    background-clip: content-box, border-box;
    border: solid 5px transparent;
  }

  .container-box-ex .box-circle::after {
    content: '';
    width: 188px;
    height: 188px;
    border-radius: 50%;
    position: absolute;
    left: calc(50% - 94px);
    top: calc(50% - 94px);
    /* 这里需要设置两个背景，第一个背景是内容区域的背景，另一个是实现渐变边框的背景 */
    background-image: linear-gradient(var(--bg), var(--bg)),
      linear-gradient(to right, #1DEEF2, #F3C954);
    background-origin: border-box;
    background-clip: content-box, border-box;
    border: solid 5px transparent;
    filter: blur(4px) brightness(80%) opacity(.8);
    z-index: -1;
  }

  /* .container-box-ex .box-circle .circle {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
  }

  .container-box-ex .box-circle .circle::before {
    content: '';
    position: absolute;
    top: 145px;
    left: 18px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #1DEEF2;
    z-index: 1;
  } */

  .container-box-ex .box-circle .box-dot-line {
    width: 188px;
    height: 188px;
    border: 5px solid transparent;
    border-radius: 50%;
    position: absolute;
    left: calc(50% - 94px);
    top: calc(50% - 94px);
    animation: rotate 3s infinite linear;
  }

  .container-box-ex .box-circle .box-dot-line .box-dot {
    position: absolute;
    width: 12px;
    height: 12px;
    top: 129px;
    left: 4px;
    z-index: 11;
    background: #F3C954;
    border-radius: 50%;
    filter: blur(1px);
    box-shadow: 0px 1px 2px 2px #f4ca2b;
  }

  .container-box-ex .box-circle .box-dot-line .box-dot::after {
    content: '';
    position: absolute;
    width: 4px;
    height: 4px;
    background: #fff;
    left: calc(50% - 2px);
    top: calc(50% - 2px);
    filter: blur(2px);
    box-shadow: 0px 1px 1px 1px #fff;
  }
</style>

<body>
  <section>
    <div class="flex-row">
      <div class="container-box">
        <div class="box-circle">
          <div class="box-dot"></div>
        </div>
      </div>
      <div class="container-box">
        <div class="box-circle clip-path">
          <div class="box-dot"></div>
        </div>
      </div>
    </div>
    <div class="container-box-ex">
      <div class="box-circle clip-path">
        <!-- <div class="circle"></div> -->
        <div class="box-dot-line">
          <div class="box-dot"></div>
        </div>
      </div>
    </div>
  </section>


</body>

</html>